''' Mission 6: Heartbeat Mild Remix - 1st option Changes the heart images to blinking pixels -- This solution uses all four pixels and two colors Students can use 1-4 pixels and 1 color (plus black) or two or more colors ''' from codex import * from time import sleep delay = 1 while True: # one heartbeat pixels.set(0, GREEN) pixels.set(1, GREEN) pixels.set(2, GREEN) pixels.set(3, GREEN) sleep(delay) pixels.set(0, YELLOW) pixels.set(1, YELLOW) pixels.set(2, YELLOW) pixels.set(3, YELLOW) sleep(delay) if buttons.was_pressed(BTN_A): delay = delay + 0.2 if buttons.was_pressed(BTN_B): delay = delay - 0.2